﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<script type="text/javascript">
    $(document).ready(function () {
        $('#newtspartner').cycle({
            delay: 4000,
            pause: 1
        });
    });
    </script>
<div id="newtspartner" class="partner">
    <%if (ViewData["HomeNewPartner"] != null)
      {
          List<Partner> listNewPartner = (List<Partner>)ViewData["HomeNewPartner"];
          if (listNewPartner.Count > 0)
          {
              int y = 0;
              for (int i = 0; i < listNewPartner.Count; i += 3)
              {%>
    <ul>
        <%for (int z = 0; z < 3; z++)
          {
              if (y < listNewPartner.Count)
              {
                  Partner obj = listNewPartner[y];%>
       <li>
            <div class="cimage">
                <img src="<%=Constants.PHOTO_PATH_ROOT_PARTNER + obj.Logo%>" width="208" height="132" /></div>
            <a class="textlink2 text" href="<%=FRouter._("cuahang",obj.ID.ToString(),obj.PartnerName) %>">
                <strong>
                    <%=Html.Encode(obj.PartnerName)%></strong></a>
            <div class="style">
                <%=Html.Encode(CommonFunc.GetMainPartnerAddress(obj.ID))%>
                <br />
                Ðiện thoại:
                <%=obj.RepresentativePhone%>
                <br />
                Giảm giá:
                <%=HttpUtility.HtmlEncode(obj.DiscountInfo)%>
            </div>
        </li>
        <% y++;
                                      }
                                  } %>
    </ul>
    <%}
    %>
    <%}
                              } %>
</div>
